<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>站点列表</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<jsp:include page="../include.jsp" />
</head>
<body class="list">
	<div class="bar">
		站点列表&nbsp;总记录数: ${fn:length(result)}
		<input type="button" id="addButton" class="formButton" value="添加" hidefocus style="float: right;margin-right: 10px" onclick="window.location='add.jsp'"/>
	</div>
	<div class="body">
		<form id="listForm" action="module.do" method="post">
			<table id="listTable" class="listTable">
				<tr>
					<th class="check">
						<input type="checkbox" class="allCheck"/>
					</th>
					<th>
						<a href="#" class="sort" name="domain" hidefocus>域名</a>
					</th>
					<th>
						<a href="#" class="sort" name="siteName" hidefocus>站点名称</a>
					</th>
					<th>
						<a href="#" class="sort" name="path" hidefocus>路径</a>
					</th>
					<th>
						<a href="#" class="sort" name="dynamicSuffix" hidefocus>动态页后缀</a>
					</th>
					<th>
						<a href="#" class="sort" name="staticSuffix" hidefocus>静态页后缀</a>
					</th>
					<th>
						<span>操作</span>
					</th>
				</tr>
				<c:forEach items="${result}" var="list">
					<tr>
						<td>
							<input type="checkbox" name="ids" value="${list.site_id}"/>
						</td>
						<td>
							<span title="${list.domain}">${list.domain}
							</span>
						</td>
						<td>
							${list.site_name}
						</td>
						<td>
							${list.site_path}
						</td>
						<td>
							${list.dynamic_suffix}
						</td>
						<td>
							${list.static_suffix}
						</td>
						<td>
							<a href="modify.do?id=${list.site_id}" title="修改">[修改]</a>
						</td>
					</tr>
				</c:forEach>
			</table>
				<c:choose>
					<c:when test="${fn:length(result)==0}">
						<div class="noRecord">没有找到任何记录!</div>
					</c:when>
					<c:otherwise>
						<div class="delete" style="padding-left: 10px">
							<input type="button" id="deleteButton" class="formButton" url="delete.do" value="删除" disabled hidefocus />
						</div>
					</c:otherwise>
				</c:choose>
		</form>
	</div>
</body>
</html>